LATEX= pdflatex
BIBTEX= bibtex
PRFDIR= proofs
DOC= paper
EXEC= evince
RM= rm -rf
CD= cd

all:
	$(CD) $(PRFDIR) ; make
	$(MAKE) paper

paper:
	$(LATEX) $(DOC).tex 
	$(BIBTEX) $(DOC)
	$(LATEX) $(DOC).tex
	$(LATEX) $(DOC).tex

run:
	$(MAKE) all
	$(EXEC) $(DOC).pdf &

disp:
	$(EXEC) $(DOC).pdf &

clean:
	$(CD) $(PRFDIR) ; make clean
	$(MAKE) cleanpaper
	
cleanpaper:
	$(RM) $(DOC).aux $(DOC).bbl $(DOC).blg $(DOC).log $(DOC).out $(DOC).toc
